Issues with profiler and atexit()/etc