check or propagate return values when writing