added cwd options & bug fixes
added cwd options & bug fixes