in reply to File I/O

Keep in mind that you'll need to use file locking if there's any chance more than one copy of the program could be run at the same time.