added logging thread