First, a suggestion -- since your file name is the same every time, put a single instance of it outside your While loop and bring it into the loop as a "tunnel", using the same wire for all your Case statements.
I don't understand the logic of your construction. You have a While loop that never stops. As long as "Write" is true, it writes to a (new originally?) file, presumably appending at the end, closing the file after the write. If Read is true, it tries to read the i-th Waveform. What if there are less than i writes?
Why not simplify things. Remove the While loop, remove the Case Statements and Read/Write buttons, and simply do one Simulate Signal, one Write, and one Read (not wiring anything into the Read's Record selector). Does that work? If so, then think about how you might extend this to handle multiple reads and writes. Is there ever a situation when you envision doing Reads while you are also doing Writes? Isn't it more likely that, at any instance, you are going to be doing only Writes (for example, while generating data) or only Reads (while analyzing the saved data)? [I'm not saying that you might want to do both simultaneously, but if you don't have to, don't complicate things for yourself].
Bob Schor