Use set -e to stop on any error, including downloads.