Improve writeField in HDF5Writer