function saveData(existingFile) {
                                    
                                    let thisFile
                                    
                                    // Here we will check to see if all timestamps received belong to the same file date or not.
                                    for (let t = 0; t < timestampArray.length; t++) {
                                        let timeToCheck = timestampArray[t]
                                        let thisTime = checkTimestamp(timeToCheck)

                                        let file = { date: new Date(thisTime) }
                                        file.year = file.date.getUTCFullYear()
                                        file.month = file.date.getUTCMonth() + 1
                                        file.day = file.date.getUTCDate()
                                        let dateForPath = file.year + '/' +
                                            SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.month, 2) + '/' +
                                            SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.day, 2)

                                            if (fileDateArray.length > 0) {
                                                let lastDateArrayEntryNum = fileDateArray.length - 1
                                                let lastDateArrayEntry = fileDateArray[lastDateArrayEntryNum]
                                                if (lastDateArrayEntry !== dateForPath) {
                                                    fileDateArray.push(dateForPath)
                                                }
                                            } else {
                                                fileDateArray.push(dateForPath)
                                            }
                                            
                                    }
                                    
                                        /*
                                        Note: Possible optimation is to not read daily file but to simply append to it. 
                                        Currently loads last file date, loads current file and then looks through timestamps to determine 
                                        if current record should be appended to file.
                                        */
                                        if (thisReport.file.lastFile !== undefined) {
                                            let lastRecordDate = thisReport.file.lastFile
                                            let lastRecordDateString = JSON.stringify(lastRecordDate)
                                            let lastRecordDateYear = lastRecordDateString.substring(1, 5)
                                            let lastRecordDateMonth = lastRecordDateString.substring(6, 8)
                                            let lastRecordDateDay = lastRecordDateString.substring(9, 11)
                                            lastDate = lastRecordDateYear + "/" + lastRecordDateMonth + "/" + lastRecordDateDay
                                        } else {
                                            lastDate = ""
                                        }


                                        if (existingFile !== undefined) {

                                            // We will loop through each line of the record and see about adding it to the file for saving!
                                            for (let c = 0; c < completeRecord.size; c++) {
                                                let thisFile = []
                                                let content = Array.from(completeRecord)
                                                let thisContent = content[c]
                                                // In order to not save duplicates we will check the last timestamp on file and not save any timestamps less than or equal to it.
                                                let existingFileLength = existingFile.length - 1
                                                let lastFileEntry = existingFile[existingFileLength]
                                                let lastTimeOnFile = lastFileEntry[0]

                                                let fileT = thisContent[0]
                                                let time = checkTimestamp(fileT)
                                                dateForPath = checkSameFileDate(time)
                                                let fileC = thisContent[1]

                                                // If timestamp is older the the last timestamp on file we save nothing and proceed through the data.
                                                if (lastTimeOnFile < time) {
                                                    fileC.unshift(time)
                                                    existingFile.push(fileC)
                                                }
                                            }

                                            existingFileContent = JSON.stringify(existingFile)

                                            saveDatasetFile("/" + dateForPath)
                                            writeStatusReport()
                                            SA.logger.info('[Success] API Response Saved.')
                                            return

                                        } else {
                                            // If the existingFile is not defined then this is the first time running.
                                            for (let c = 0; c < completeRecord.size; c++) {
                                                let runCount = c 
                                                let content = Array.from(completeRecord)
                                                let thisContent = content[c]

                                                // This is the timestamp we use to build the path.
                                                let fileT = thisContent[0]
                                                let time = checkTimestamp(fileT)

                                                if (runCount === 0) {
                                                    thisFile = []
                                                    // Here we handle the beginning of the market for our status report.
                                                    if (contextVariables.beginingOfMarket === undefined) {
                                                        contextVariables.beginingOfMarket = new Date(time)
                                                    }
                                                } 

                                                dateForPath = checkSameFileDate(time)
                                            
                                                let fileC = thisContent[1]
                                                fileC.unshift(time)
                                                thisFile.push(fileC)

                                            existingFileContent = JSON.stringify(thisFile)

                                            // If the path to the file does not exist we get ready to make it.
                                            let fileName = 'Data.json'
                                            let filePath =
                                                TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).FILE_PATH_ROOT +
                                                "/Output/" + productDefinition.config.codeName + "/" + outputDataset.referenceParent.config.codeName + '/' + dateForPath
                                    
                                            let basePath = global.env.PATH_TO_DATA_STORAGE
                                            if (SA.nodeModules.fs.existsSync(basePath + '/' + filePath + '/' + fileName) !== true) {
                                                thisReport.file.lastRun = new Date()
                                        }

                                        saveDatasetFile("/" + dateForPath)

                                        if ((content.length - 1) === c) {
                                            writeStatusReport()
                                            SA.logger.info('[Success] API Response Saved.')
                                            return
                                        }
                                    }
                                }
                            }
Here we will loop through the rest of the data defined at the record properties.