fixed dims when writing 2D and 3D hdf5 arrays
changed write commands over to new output interface