Removed write_output_file method and simplified set output file method