Building failures :diagnosis and avoidance