-events= require("events")
-fs =require('fs')
+events = require("events")
+fs = require('fs')
 
 environment = process.env['NODE_ENV'] || 'development'
 

      if block.end > block.start
        stream = fs.createReadStream(@filename, {start:block.start, end:block.end-1, encoding:"utf-8"})
        stream.on 'error',(error) =>
          console.log("Tail error:#{error}")
          @emit('error', error)
        stream.on 'end',=>
          @internalDispatcher.emit("next") if @queue.length >= 1

          @buffer = parts.pop()
          @emit("line", chunk) for chunk in parts

  constructor:(@filename, @separator=/[\r]{0,1}\n/, @fsWatchOptions = {}, @fromBeginning=false) ->
    @buffer = ''
    @internalDispatcher = new events.EventEmitter()
    @queue = []
