optimize file removal