made repository is optional, and working directory should be more
strict.