To play safe writing to a file for a long period of time you should:
- when opening the file, set the deny mode to 0 (deny read/write). That will prevent other applications (FindFast, antivirus, backup) to access the file simultaneously causing you write errors. By default, files are opened allowing simultaneous access to other apps. If you need that already written data be available, use "deny write-only" but make error checking in case write errors occur (just retry until no error).
- use the advanced file function "Flush File" once in a while. That will force any file buffer in memory to be written on disk and update the directory entry of the file. The file stays open.