fixing the uploading/deleting file management