The Logic Of Failure: Recognizing And Avoiding Error In Complex Situations