Exit with nonzero return code on error