Improved the logging statements.