Fix exception when deleting a source file if output file specified

* i'm realizing that the single file output mode requires quite a bit of
special handling