Emit errors instead of logging them, fixes #4