fixed file delete bug