Fixes to example 17, debug logging (for now)