Exit with error code on failure