Small improvement to data writing structure