Adding Fail handler