server.js: better error handling to help debug configuration errors.
server.js: remove a debug statement.
Merge pull request #4 from mlutfy/better-err-handling

Improve the error handling. thx mlufy