fix for deleting file directory after processing