private static void DeleteFile(string fileName, Helper.LogManagement logg, string logpath) { try { logg.CreateCustomLog(logpath, "Inside DeleteFile"); if (System.IO.File.Exists(fileName)) { System.IO.File.Delete(fileName); logg.CreateCustomLog(logpath, "File found deleted"); } } catch (Exception ex) { throw new Exception("Error in function DeleteFile" + ex.Message); } }