Improvements to the way the logging is done