add logging stuff to example