removed unnecessary exit 1s, since set -e covers this for us automatically