or you might not have closed the file tjhat you were previously saving to, i have just done a program with text files and they are a bit of a pain in the arse, they need a lot of error handling.