Implementing a cancellable "infinite" loop
Your catch statement is catching any error (EVERY ERROR), which is not a good thing.  I assume there are several errors that you are anticipating, but you shouldn't catch them all.  You will run into bugs and won't know what is going on because the errors will be bulked into your cancellation. 

I would catch only the exceptions that you know about and are ready for, meaning that you have a solution for that exception.



You also might want to set it so that right before WaitForFile is exited, it closes the file no matter what happens inside the method.