More checks and logging.