improve process of deleting files