From a quick look at the code it looks fine and I didn't see any obvious coding errors. It looks like you must be calling the exit case. That is the only way your code should exit, however as far as I can tell the file I/O has nothing to do with your decisions on the what state to run next.
Because we don't have your SubVIs we can't really tell you where the issue is. I would suggest probing the Test Sequence wires to see exactly which event was fired before you called exit. Then look to see why that case decided on the exit case. I have a feeling it is in your Ambient Limits subVI.