Added error detection for when a repository does not exist any more