continue refactor and modify file.c