backend delete files functionality