Fix for NMS-5880 and some logging improvements for thresholds.