Two things,
The Write Characters to file.VI wants a valid file path. Your code does not appear to be doing that.
Also, that VI will by default prompt for a file.
I suggest you do as "save As" with a new name to your working folder. Then, modify this VI by wiring a constant to the input of the first VI in there where it lets you disable the dialog.
Ben