Added logging and try/catch IN INDEX

The require like mongodb is not needed for all modules. try/catch is
just a temp. fix
Added errors
Merge remote-tracking branch 'remotes/upstream/master'

Conflicts:
	index.js