Fix up error handling

@singingwolfboy since you didn't closely review #6 :stuck_out_tongue: