private static Stream TryOpenFile(string path) { if (!File.Exists(path)) { return null; } try { return File.OpenRead(path); } catch { return null; } } }