Now writing to h5 file multiple times; still need to extend h5 arrays.