add -ex to guarantee we exit non-zero