Exit with a non-zero exit code if something goes wrong