logged threshold to global.txt file