add hook for inspecting failures