save clustering result into files.