Addition of debug logging.