Changed the way to remove files.