correct the examples
Add logging support