Add debug logging.