add debugging (pprof) API, fix stats never starting