added logging to thresholds