Update code generator
Fix export filename
Check if migration directory exists