add cwd support