Added support for cwd option