Better checking for failed runs