Check some errors

Discovered by https://github.com/kisielk/errcheck

@wvanbergen there are others, but these are the ones I know don't conflict with producer-ng :)