fix memory leaks in file delete