Added debugging logging.