Updated node.js server with advanced logging