Improved logging.