added logging for db.js