added logging support
added logging options