fixing the logging