static void Main(string[] args) { var csvPath = args[0]; if (!fileHandler.IsValidFile(csvPath, CSV_EXTENTION)) { Console.WriteLine($"'{csvPath}' is not a valid file."); } var recordsResult = fileHandler.ExtractRecordsFromFile(csvPath); if (recordsResult.HasError) { Console.WriteLine("A record in the file failed validation. Processing has stopped."); } else { processedRecords = recordsResult.Records .Select(recordHandler.ProcessRecord) .ToList(); } }