Bring back explicit error checking since bash set -e seems to not be reliable enough