You need to set the file position to Last when you are writing some text to the same file again otherwise it will overwrite the previous data(I guess thats what happening now).
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.