diff --git a/lib/db.js b/lib/db.js
index <HASH>..<HASH> 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -22,6 +22,7 @@ mkdirp.sync(path.join(DB_PATH, '/cache'))
 ============================================================================== */
 
 let loaded = false
+let loadError = null
 const onLoads = []
 
 var db = (module.exports = {
@@ -35,7 +36,7 @@ var db = (module.exports = {
   instances: ['users', 'connections', 'queries', 'cache', 'config'],
   onLoad: function(fn) {
     if (loaded) {
-      return fn
+      return fn(loadError)
     }
     onLoads.push(fn)
   }
@@ -73,6 +74,7 @@ async.series(
   ],
   function finishedLoading(err) {
     loaded = true
+    loadError = err
     onLoads.forEach(fn => fn(err))
   }
 )
Fix and enhance db.onLoad (#<I>)