fixed test_file_gen