     parse_line: (line) ->
         if @should_parse_data
             @file.append(line)
-            if @file.closed
+            if @file.ready
                 @should_parse_data = false
                 @file.open()
+                @file = null
 
         else if line.match /open\n/
             @file = new FileHandler(@)

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

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

            fs.writeSync(@fd, line)
        if @readbytes >= @datasize
            fs.closeSync @fd
            @ready = true

    open: ->
        atom.focus()
