ive written a program, that keeps overwriting each line in a text document, until the end of the document. the only problem is, the act of overwriting causes it to not be the end of the document anymore. here is the code, how could i fix? or any appropriate tutorials you could point me to?