             fs.writeSync(@fd, line)
         if @readbytes >= @datasize
             fs.closeSync @fd
-            @closed = true
+            @ready = true
 
     open: ->
         atom.focus()

        @session = session
        @settings = {}
        @readbytes = 0
        @closed = false

    set: (index, value) ->
        @settings[index] = value

    parse_line: (line) ->
        if @should_parse_data
            @file.append(line)
            if @file.ready
                @should_parse_data = false
                @file.open()
                @file = null

        else if line.match /open\n/
            @file = new FileHandler(@)
