A few problems with that VI:
If using a shift regster, you also would need to wire the path across in the FALSE case. If not, the path will revert to an empty path.
Solution: Don't use a shift register for the path, just wire it in via a plain tunnel, It never changes.
BetterOpen the file outside the loop, write using low lever file I/O inside the loop, close the file outside the loop on the right. Currently you are constantly opening-writing-closing the file. This is like running a marathon, but taking the shoes off, then putting them pack on after each step. Lot's of effort for nothing.
😉Also
all the other shift registers have no function at all, they only feed empty strings to the recording case. (Unless somebody would be fast enought to constantly press the button, in which case, you'll write duplicate entries (AABABCABCDABCDE...)). Eqqually bad.
Solution:
Remove all shift registers and remove the top terminals of the concatenate string functions.