Help verify Cooldown Reduction script is working correctly

So myself, and one other are trying to see if the Decrypted Uhr M+ buff is working correctly with a few abilities and we are trying to see if our script is correct or if we need to adjust. So the Decrypted Uhr increases the speed at which cooldowns are recharged. However we think there is an in-game bug with the trinket and it not affecting the monk ability Storm, Earth and Fire. For testing we set up the following script

SPELL_UPDATE_COOLDOWN 
local dbg = function(change_in_cd, rate, cooldownStart, cooldownDuration, chargeModRate, bDecryptedUrh)
    DEFAULT_CHAT_FRAME:AddMessage("-"..change_in_cd..", ("..(rate*100).."%) GSC - Start: "..cooldownStart.." Duration: "..cooldownDuration.." ModRate: "..chargeModRate..(bDecryptedUrh and "(Decrypted Urh)" or ""))
end
local SEF = 137639
local   currentCharges, 
        maxCharges, 
        cooldownStart, 
        cooldownDuration, 
        chargeModRate = GetSpellCharges(SEF)
if currentCharges < 2 then
    local ttc = cooldownStart + cooldownDuration - GetTime()
    if not aura_env.last_ttc or aura_env.last_ttc > ttc then
        if aura_env.frame_time then
            local urh = GetPlayerAuraBySpellID(368239) 
            local change_in_cd = aura_env.last_ttc - ttc
            local rate = change_in_cd / (GetTime() - aura_env.frame_time)
            dbg(change_in_cd, rate, cooldownStart, cooldownDuration, chargeModRate, urh)
        end
        aura_env.last_ttc = ttc
        aura_env.frame_time = GetTime()
        
    end
    else
      aura_env.last_ttc = nil
      aura_env.frame_time = nil
    end

We are just wanting to get a second set of eyes on.
This is what we are currently outputing