Exit nonzero if not everything goes to plan

I attempted to write a testcase, but my node fu is weak.. and realistically this seems selftesting, so either

1. Please give feedback on how to write this test
2. Don't merge the second commit