fix save_debug_files