Renamed input parameter to infile and output to outfile for clarity