use more of setup infrastructure for tests
more explicit error handling on xpath failures