resize and remove files