private static void DeleteFile(string filename) { if (filename != null) { if (File.Exists(filename)) File.Delete(filename); } } }