use attr_writer instead of error_mode= method

@fw42 Use ````attr_writer :error_mode```` method to assign to error_mode instead of ````error_mode=```` method