add BREAK_ERROR for write_buf_check_n_flush()