rename the save_params_H5 function to be a general function save which can potentially support other file format