private string TryFindFile(string[] paths) { foreach (var path in paths) { if (File.Exists(path)) return path; } return null; }