Adding threaded logger code