Solved!! Thanks to all. I'm going to go with chipmunk's solution as it seems to me the most logical, but this thread has been most educational. BTW, my problem with the file opening turned out to be my mistake and/or a windows glitch - on closer inspection in DOS it turns out the file had gotten named "blah.txt.txt", hence of course "blah.txt" doesn't exit. A simple renaming and that's fixed.