changed outfile = infile