changed file delete function to use multiple delete