hey thanks for this. there was no reason I was using IO:File apart from what I found online in a tutorial. I found the problem was with where the program was creating the file 'C:\Users\user' instead of that I expected it to create it in the same directory the program is in.