Add error handling to install-repo.sh