code gen changes, fixed errors
added target directory