     @currentCount = 0
     @totalCount = -1
     @chunkSize = 1000*1000*10
+    @stringifiedDump = ""
     @initLastDump()
     @dumpServerURL = "http://127.0.0.1:8080/"
     @checkIfNeedNewContext()

  getDumpURL : (sendResponse) =>
    sendResponse @DumpURL

  writeNextChunk : (remainingDump) =>
    if remainingDump.length is 0
      return

    if remainingDump.length > @chunkSize
      chunk = remainingDump.substring(0,@chunkSize)
      remainingDump = remainingDump.substring(@chunkSize)
    else
      chunk = remainingDump
      remainingDump = ""
    @fs.root.getFile 'dump.json', {create: false}, (fileEntry)=>
            fileEntry.createWriter (fileWriter)=>

              fileWriter.onwriteend = (e) =>
                @currentCount++
                @writeNextChunk remainingDump

              fileWriter.onerror  = (e) =>
                console.log e

          @fs.root.getFile 'dump.json', {create: true}, (fileEntry)=>
            console.log fileEntry.toURL()
            @DumpURL = fileEntry.toURL()
            console.log "Dump size is : #{dump.length}"
            @stringifiedDump = JSON.stringify(dump)
            console.log "stringifiedDump size is : #{@stringifiedDump.length}"
            @totalCount = Math.ceil(@stringifiedDump.length/@chunkSize)
            console.log "The total count : #{@totalCount}"
            console.log "The current count : #{@currentCount}"
            @writeNextChunk()
          , (e) ->
            console.log "Cannot write file to disk"
          return
