var request = require('request')
var fs = require('fs')

request('http://devtoolsremote.com/_stats', function(err, response, body) {
	if (err) throw err

	var body = JSON.parse(body)
	var line = '' + Date.now() + ',' + body.count.targets + ',' + body.count.sockets + '\n'

	fs.appendFile('web/_stats.txt', line, encoding='utf8', function (err) {
    if (err) throw err
	})
})

@@ -128,32 +128,62 @@
 dy) %7B%0A%09if (err) 
+%7B%0A%09%09console.log('err', err)%0A%09%09
 throw err%0A%0A%09var 
@@ -175,16 +175,19 @@
 hrow err
+%0A%09%7D
 %0A%0A%09var b
@@ -299,16 +299,50 @@
 + '%5Cn'%0A%0A
+%09console.log('stats.line', line)%0A%0A
 %09fs.appe
@@ -410,12 +410,10 @@
 ) %7B%0A
-    
+%09%09
 if (
@@ -417,16 +417,48 @@
 f (err) 
+%7B%0A%09%09%09console.log('err', err)%0A%09%09%09
 throw er
@@ -459,15 +459,19 @@
 row err%0A
+%09%09%7D%0A
 %09%7D)%0A%7D)%0A

Add logging to stats worker