run logger in separate thread