python function debug decorator (quick hack - not sure of useful)