properly check for existing repo