move thaw exception handler outside of `thaw` (it's recreated everytime the function gets called now)