This script should set -e shouldn't it?