Fix crash when no output file is specified.