Fixed #1 add generate option to empty output directory first