Updated Server.js and Router.js to listen for errors