                 # for a valid w3c log, level should == "request", meta.
                 logline = "#{meta.ip} #{strftime(new Date(meta.time),"%F %T")} #{meta.path} 200 #{escape(meta.ua)} #{meta.bytes} #{meta.seconds}\n"
             
-                if @file
+                if @file && !@_opening
                     # make sure there aren't any queued writes
                     unless _u(@queued).isEmpty
                         q = @queued

        
        open: (cb) ->
            if @_opening
                # we're already trying to open.  return an error so we queue the message
                cb?(true)
                return true
            
            # otherwise, open the file
            @_opening = true

                    # existing file...  don't write headers, just open so we can 
                    # start appending
                    initFile = false
            
            @file = fs.createWriteStream @options.filename, flags:(if initFile then "w" else "r+")
            
            @file.once "open", (err) =>   
                console.log "w3c log open with ", err
                if initFile
                    # write our initial w3c lines
                    @file.write "#Software: StreamMachine\n#Version: 0.1.0\n#Fields: c-ip date time cs-uri-stem c-status cs(User-Agent) sc-bytes x-duration\n", "utf8", =>
                      @_opening = false
                      console.log "w3c open complete"
                      cb?(false)
                    
                @flush()
                            
        #----------
            
        close: (cb) ->
            @file?.end null, null, =>
              console.log "W3C log file closed."
            @file = null
            
        #----------
