       try
         rpc = soap.request(body, sessionContext?.cwmpVersion, parseWarnings)
       catch err
-        msg = {
+        logger.accessError({
           message: 'XML parse error'
           parseError: err.message.trim()
-          sessionContext: sessionContext or {}
-        }
-        msg.sessionContext.httpRequest = httpRequest
-        msg.sessionContext.httpResponse = httpResponse
-        logger.accessError(msg)
+          sessionContext: sessionContext or {httpRequest: httpRequest, httpResponse: httpResponse}
+        })
         httpResponse.writeHead(400, {'Connection': 'close'})
         httpResponse.end(err.message)
         stats.concurrentRequests -= 1

      return session.init(deviceId, rpc.cwmpVersion, rpc.sessionTimeout ? config.get('SESSION_TIMEOUT', deviceId), (err, sessionContext) ->
        return throwError(err, httpResponse) if err

        sessionContext.sessionId = crypto.randomBytes(8).toString('hex')
        httpRequest.connection.setTimeout(sessionContext.timeout * 1000)


    )

    parsedRpc = (sessionContext, rpc, parseWarnings) ->
      for w in parseWarnings
        w.sessionContext = sessionContext
        w.rpc = rpc;
