             if error == nil && response?.statusCode == 201 {
                 Analytics.logger.debug("Analytics data successfully sent to the server.")
                 
-                deleteFile(Constants.File.Analytics.outboundLogs)
+                BMSLogger.deleteFile(Constants.File.Analytics.outboundLogs)
             }
             else {
                 Analytics.logger.error("Request to send analytics data to the server has failed.")
             }
             
-            userCallback?(response, error)
+            // The userCallback must be of AnyObject type because it is defined in BMSAnalyticsSpec, which is not aware of the MfpCompletionHandlerType (since it is defined in BMSCore)
+            if let callback = userCallback as? MfpCompletionHandler {
+                callback(response, error)
+            }
         }
         
         // Use a serial queue to ensure that the same analytics data do not get sent more than once
         dispatch_async(BMSLogger.sendAnalyticsToServerQueue) { () -> Void in
             do {
                 // Gather the logs and put them in a JSON object
-                let logsToSend: String? = try getLogs(fileName: Constants.File.Analytics.logs, overflowFileName: Constants.File.Analytics.overflowLogs, bufferFileName: Constants.File.Analytics.outboundLogs)
+                let logsToSend: String? = try BMSLogger.getLogs(fileName: Constants.File.Analytics.logs, overflowFileName: Constants.File.Analytics.overflowLogs, bufferFileName: Constants.File.Analytics.outboundLogs)
                 var logPayloadData = try NSJSONSerialization.dataWithJSONObject([], options: [])
                 if let logPayload = logsToSend {
                     let logPayloadJson = [Constants.outboundLogPayload: logPayload]

                }
                
                // Send the request, even if there are no logs to send (to keep track of device info)
                if let request: BaseRequest = buildLogSendRequest(analyticsSendCallback) {
                    request.sendData(logPayloadData, withCompletionHandler: analyticsSendCallback)
                }
            }

        // Bluemix request
        // Only the region is required to communicate with the Analytics service. App route and GUID are not required.
        if bmsClient.bluemixRegion != nil && bmsClient.bluemixRegion != "" {
            guard BMSAnalytics.apiKey != nil && BMSAnalytics.apiKey != "" else {
                returnInitializationError("Analytics", missingValue: "apiKey", callback: callback)
                return nil
            }
            headers[Constants.analyticsApiKey] = BMSAnalytics.apiKey!
            
            logUploadUrl = "https://" + Constants.AnalyticsServer.hostName + bmsClient.bluemixRegion! + Constants.AnalyticsServer.uploadPath
            
