Fixes a segfault in exit_program() if opening an output file fails.
Attach a file by drag & drop or click to upload