Add debug module and a few strategic calls, remove logging in examples