Significantly improved logging.