Analyzing and Learning from Failure