Refine file management function
Revert "Refine file management function"

This reverts commit 0b95e5c4979d5fd2e4c20dd6af04f3193a55a760.
Revert "Revert "Refine file management function""

This reverts commit b0bd86664909f64ea24de897b58db5b49fc03fa0.
Remove redundant files