If that works ok except for the last instruction I think you should add on the .txt file a \r at the end of your txt file.
As you are getting the data previous to the /r pattern match the last instruction is not read if you dont put the /r at the end.
Can you try that to see if that works?
Regards,
Jaime Cabrera
NI Applications Engineering