prevent job crash in case of currupt gzip files

without reformat.

By putting the if in the traphandler before the trap==null check it should now also work without a configured trap.

My solution might be too tailored. I like the idea to catch a broader range of corruptness in files with an own Exception to handle them at a lower level.