[CLEANUP] Do not silence errors anymore.

This change also checks the return value of xpath queries.