Modifying script to have correct error output if repo is tainted