only set cwd to a default if not set already