if (not(open OUTFILE, ">$currentFile")) {die("Error opening file: $!");};