add function stack tracing