moved check for repo existance