While working on problem with ide configuration file curruption (still unresolved), I have noticed that if two instances of same application do SaveFile at the same time, file can get corrupted.
Means there should be some sort of locking so that if some file is open with FileOut or FileAppend, next opening of the same file fails.
There already were some sharing flags, but they worked only in Win32 and IMO were never used.
Resolving situation: FileStream now supports NOWRITESHARE flag in Linux too (using flock system call), other sharing flags are deprecated (I think that for more complex situation, you cannot use FileStream anyway).
FileOut and FileAppend now specify NOWRITESHARE flag. Means second concurent try to FileOut the same file is gonna fail (file does not open).