cache flushing added to hdf5writer