When a GsFile is open for update (that is, for both reading and writing), in certain cases if a read operation is followed by a write, the text to be written will be appended to the end, not at the desired location.
The problem occurs when the position at which the write is intended is larger (later in the file) than the position of the previous read.
Writing to positions earlier in the file than were most recently read avoids the problem; however, to be safe, close and reopen the file after read and before a write.
Last updated: 3/25/16