bug fix, NullPointer if there is no output file extension