delete file manage and fix some function