fix the logging