fix file delete issue