it starts writing to the wrong part of the file after multiple edits.