Added produce_debug_report function