handle failures early and return.