write new dataset to a existing h5file or create it if not existing
correctly check file existence