Build: Fix failure detector and failure handler