minor fixes
added chdir
minor fixes