Your attached VI cannot find its global variables. Otherwise, your VI appears to be fine. When you write data to c:\temp\txtvits2.txt, I recommend that you open the file once before the while loop and close it once after the while loop. Your technique of opening/writing/closing each time is inefficient.
I'm guessing your second comment about FTP is a completely different problem? After you put the text file via FTP, try the command "get -". This will dump the text to the screen (if there is any). It sounds like either your text file is not being "put" properly.