added set -e and setup -u