Refactor some repeated codes to BaseGenerator and updated the test
Change command prefix to make
Perform check before making directory
Fix return placement
Refactor for more readable code
Merge and fix conflict