     storage_server = require('storage_server')
     db = undefined
     projects = undefined
+
+    # this happens sometimes... due to disconnect from database...
+    process.addListener "uncaughtException", (err) ->
+        winston.error("Uncaught exception: #{err}")
+
     async.series([
         (cb) ->
             storage_server.get_database (err, d) ->

                            s.error = err # error *recorded*
                        c() # keep going no matter what

            async.mapLimit(projects, opts.limit, f, cb)
    ], (err) -> opts.cb?(err))


                projects.sort()
                cb(err)
        (cb) ->
            g = (project_id, c) ->
                s = {project_id:project_id}
                opts.status.push(s)
                cs = db.chunked_storage(id:project_id)
