We should use `@extensions.include?(File.extname(file))` to check if the file matches the extension.