fix missing printf arg and add a simple xbuf iterator

Reviewer: @poolakiran