enhanced delete files functionality