Minor improvements to logging.