Improve the file management