My guess (although I can't releate this to your posted stacktrace (which is awfully short by the way)), is that this is a rights issue, where the Mendix runtime doesn't have the proper access to whatever folder this file is created in.
The good news is that's it's easy to debug an on premise, the JVM parameters to use for this can be found somewhere on this forum.
If it's a rights-issue however, I would expect you to also see errors when uploading the file...
It was a setting in IIS: the checkbox for Append Query string