add checks that files for output streams are opened successfully
This shouldn't happen very often, but now it will at least abort the job straight away.
Edited by Nils Erik Krumnack
This shouldn't happen very often, but now it will at least abort the job straight away.