Updated function tracer

* Import DRY
* Broader catch

I broke it with the provisioning moving, so I fixed that and made slight refactoring in it + broader catch of functions.