Renamed variables called f to infile.