Exit with error code if failed.