                     # existing file...  don't write headers, just open so we can 
                     # start appending
                     initFile = false
-                
-            @file = fs.createWriteStream @options.filename
+            
+            @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"
-
-                @once "flush", =>
-                    @_opening = false
-                    console.log "w3c open complete"
-                    cb?(false)
+                    @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()
+            @file?.end null, null, =>
+              console.log "W3C log file closed."
             @file = null
             
         #----------

        
        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

            process.addListener "SIGHUP", =>
                # re-open our log file
                console.log "w3c reloading log file"
                @close => @open()
                
        #----------
        
