improved deleting file