Improve the logging system