fixed another sample_file bug