Optimize the file exclusion feature