changed infile to be set by argv[1]