Small nit: swap the if/else clauses so you don't have to negate (or name the variable is_single_write or something). Easier to parse for humans.