Start working on writing hdf5 file.