fixes typo
modifies hx to test for success and exit 1 if not