Hi ariv,
As the vi path is wired through the for loop the function write characters to file.vi will get a blank path and will prompt for a file location .
That's what I wanted to point out...
The function where the error occurs is write characters to file .vi which is outside the for loop.
Which parameters/data are passed to that function when an error occurs? Did you check that?
Can you replicate that error using the same parameters/data in a fresh VI?