Minor fixes in logging and examples