Add if else statement codeGen
fix test to use new directory name