Ah, I missed this, sorry.  I keep thinking defer runs when the variable goes out of scope which is wrong. thanks.