added some logic to the failure