What might be it is that since the second txt file is 700 Kb, it was probably too big to have been created in Notepad (Ascii), therefor it will probably be created in something like Wordpad (Unicode), so possibly your code is expecting an Ascii file (like F1.txt) but instead gets an Unicode file (F2.txt) which would then cause troubles.