save data generator to file