add support for setting new cwd