added --cwd for local commands