Creating audit and security logs