remove read_file function, add text file for output