removed redudant write check of repositories directory