I have just reproduced that issue.
As I wrote in comment.
FileMode.Open
erases contents of the file whileFileMode.OpenOrCreate
does not.
It seems that new content of the file is one char shorter than previous that’s why you see “>” at the end.
If you are writing the file use FileMode.Create
that should do for you.