 
         # Browsers log to logs/#{browser.id}.log
         # TODO: only use logfile if not running tests.
-        @logPath = Path.resolve(__dirname, '..', '..', '..', 'logs', "#{@id}.log")
-        @logStream = FS.createWriteStream(@logPath)
-        @logStream.write("Log opened: #{Date()}\n")
-        @logStream.write("BrowserID: #{@id}\n")
+        @consoleLogPath = Path.resolve(__dirname, '..', '..', '..', 'logs', "#{@id}.log")
+        @consoleLogStream = FS.createWriteStream(@consoleLogPath)
+
+        @bwLogPath = Path.resolve(__dirname, '..', '..', '..', 'logs', "#{@id}.bw.log")
+        @bwLogStream = FS.createWriteStream(@bwLogPath)
+
+        for stream in [@consoleLogStream, @bwLogStream]
+            stream.write("Log opened: #{Date()}\n")
+            stream.write("BrowserID: #{@id}\n")
 
         # Performance tracking.
         @bytesSent = 0

                    args = Array.prototype.slice.call(arguments)
                    args.push('\n')
                    str = args.join(' ')
                    self.logStream.write(str)
                    self.emit('log', str)

        if process.env.TESTS_RUNNING

        msg = JSON.stringify(params)
        bytes = msg.length
        @bytesReceived += bytes
        @bwLogStream.write("#{Date()}  -- Recv #{bytes} characters (#{msg})\n")
        @pauseRendering()
        @events.processEvent(params)
        @resumeRendering()
