Under most Unixes and Posix conforming operating systems performing an open() operating system call with the O_APPEND indicates to the OS that writes are to be atomic append
Why can't you use
System.IO.File.AppendAllText("C:\\somefile.txt", "some content");
? That's a thread-safe/"atomic" call as well.