added thread logging