Refactor handling of blacklisted files