Fixed generation of empty file being skipped bug.