I think it makes sense to update `hash` only on successful writes.