Changed node.js code to be sync... :-(