                     cb   : (err) ->
                         if not err
                             timestamp = moment(new Date(d*1000)).format('YYYY-MM-DD-HHmmss')
-                            local_snapshots[project_id].push(timestamp)
+                            if not local_snapshots[project_id]?
+                                local_snapshots[project_id] = [timestamp]
+                            else
+                                local_snapshots[project_id].push(timestamp)
                         cb(err)
             # update checksums in case of bitrot
             (cb) ->

        outFile:program.logfile
        errFile:program.logfile

    daemon(conf, start_server)

    #process.addListener "uncaughtException", (err) ->
    #    winston.error "Uncaught exception: " + err

winston   = require 'winston'
fs        = require 'fs'

uuid      = require 'node-uuid'
async     = require 'async'
moment    = require 'moment'

message   = require 'message'
misc      = require 'misc'
misc_node = require 'misc_node'
