More robust logging.