Add stricter error-checking
Add stricter error-checking

In upcoming commits, these errors will be incorporated into the
logging-system, so they don't look so out of place when issued.

cmotc/ratox,pranomostro/ratox,cmotc/ratox,insanity54/batox,kytvi2p/ratox,pranomostro/ratox