changed outfile extension to txt