fix codegen dir not exist bug