introduce DEBUG mode flag