Log the UI tree on error

The dump method doesn't actually print anything, just
returns the tree as a string.
Merge pull request #6 from dnarvaez/printui

Log the UI tree on error