I would not attempt to read from a file and write to it at the same time. You could run into big problems, file size changes, current file pointer changes, etc. You should use Notifiers or Semaphores or something to lock out one process while doing the other. Example: before you read, aquire a semaphore, read, then release the semaphore. Same thing with write: aquire, write, release. That way you won't have a clash of read/write processes. If the read process is in progress and the write wants to start, it will see that the semaphore is locked and it will have to wait until the read releases the semaphore before it can aquire then write. If you are not familiar with semaphores, search the examples folder for some examples.