Display better error messages from node server.js

Also, the "server running" message was being displayed too early.