deleting infile - was causing runtime error of unfreed memory