added error ahndling when working directory is R Home  See issue #51