modify a bug when save the temp data for training