fixed a bug when creating resume file.