This FM error code is "Window is Missing". I don't think this is the same as the "Server Event Log Code 112" which is an informational notice about cache flushing.
Edited: Because I did not read your post carefully enough the first time!
I'm not certain why you are getting a "window is missing" error. I just tested an almost identical version of your scripting and it works. The only thing I changed was that I specified the file path directly (I have a similar operation in one of my files that grabs the filepath from a pre-set global field) rather than using the set variable method you used. Don't worry though - there are plenty of very bright people on here who will come along with an exact explanation of what's wrong.