Fixed the logging