private string GetLogsFilePath(string logsDirectory, AutomationType automationType, string projectName) { string logsFilePath = $"{Path.Combine(logsDirectory, automationType.ToString(), projectName + DateTime.Now.ToString("MMddyyyyhhmmss") + ".txt")}"; if (!Directory.Exists(Path.GetDirectoryName(logsFilePath))) { Directory.CreateDirectory(Path.GetDirectoryName(logsFilePath)); } return(logsFilePath); }