threaded diagnostics working, reduced memory consumption