Main function to generate G and FG hdf5 file
The hdf5 file naming follows the format of G/FG_N_chunksize.h5