Added option to save distribution function in h5 file