more logging tweaks and clean up the example