     if obj.filename?
       @filename = obj.filename
     else
-      alert 'no filename specified'
+      console.error 'no filename specified'
       return
 
     if !obj.itag?
-      alert 'No format specified'
+      console.error 'No format specified'
       return
 
     @itag = obj.itag
     if !@formats[@itag]?
-      alert 'Wrong format specified'
+      console.error 'Wrong format specified'
       return
 
     @startByte = @timeToBytes(@start)

    if @currentChunk == Math.ceil( @chunks ) #finished -last chunk
      @fileStream.end result.bytes,'binary',(err)=>
        if err?
          alert 'Cannot save the file'
          return
        @emitter.emit 'done'
        if next? then next()
    else #not finished yet
      @fileStream.write result.bytes,'binary',(err)=>
        if err?
          alert 'Cannot save the file'
          return
      start = @savedBytes
      if @currentChunk >= Math.floor( @chunks )

      if temp.status!='ok'
        console.log 'error',temp.reason
        return

      @formats = {}
      for itag,i in temp.itag
