Better thread logging.