Node.js and MongoDB - no data inserted

I'm trying to get a simple test going - moving some data from SQL Server to MongoDB using Node.js Not sure what is wrong with this code but I have three issues.

1) The 'Why does this line print more than once?' prints 2 times to the console
EDIT - this was happening because of the favicon request from the browser (fixed)
2) No data gets inserted into MongoDB
3) The server exits at the end of one request - with no error

var http = require('http');
var sql = require('node-sqlserver');
var _ = require('underscore')._;

var connstr = "Driver={SQL Server Native Client 11.0};Server=ProdSqlServer;" + 
              "Database=CDDB;Trusted_Connection={Yes}";

http.createServer(function(req, res) {

    res.writeHead(200, { 'Content-Type': 'application/json' });
    var mongoUrl = "mongodb://localhost:27017/test";
    var stmt = "select top 10000 PersonID as Id, * from People";

    require('mongodb').connect(mongoUrl, function(err, conn){
        sql.query(connstr, stmt, function(err, results) {
            if(err) console.log(err);
            var jsonResults = JSON.stringify(results);
            res.write(jsonResults, 'utf8');

            conn.collection('tracks', function(err, collection) {
                if(err) console.log(err);
                _.each(results, function(x) {
                    collection.insert(x);
                });
            });
            console.log('why does this print more than once?');
            res.end();
        });
    });
}).listen(process.env.PORT || 8080);