added logging support