Improvements to logging.