Little refactoring test.sh, use set -e