Added more debug logging.