Update error handling (closes #10)