logging improvements in examples