open INFILE, "$inputfn" or die "Error reading input file: $!\n";