             // Merge the logs from the normal log file and the overflow log file (if necessary)
             if Logger.fileManager.isReadableFileAtPath(overflowLogFile) {
                 let fileContents = try NSString(contentsOfFile: overflowLogFile, encoding: NSUTF8StringEncoding) as String
-                writeToFile(logFile, string: fileContents, loggerName: Logger.internalLogger.name)
+                writeToFile(logFile, logMessage: fileContents, loggerName: Logger.internalLogger.name)
             }
             
             // Since the buffer log is empty, we move the log file to the buffer file in preparation of sending the logs. When new logs are recorded, a new log file gets created to replace it.

            // Before sending the logs, we need to read them from the file. This is done in a serial dispatch queue to prevent conflicts if the log file is simulatenously being written to.
            switch bufferLogFile {
            case FILE_ANALYTICS_SEND:
                try dispatch_sync(Logger.analyticsFileIOQueue, block: { () -> () in
                    fileContents = try NSString(contentsOfFile: bufferLogFile, encoding: NSUTF8StringEncoding) as String
                })
            case FILE_LOGGER_SEND:
                try dispatch_sync(Logger.loggerFileIOQueue, block: { () -> () in
                    fileContents = try NSString(contentsOfFile: bufferLogFile, encoding: NSUTF8StringEncoding) as String
                })
            default:

            
            logAsJsonString! += "," // Logs must be comma-separated
            
            Logger.writeToFile(logFile, logMessage: logAsJsonString!, loggerName: self.name)
        }
    }
    
