Extra assertions and logging.