use Dialog.js to create dialog in Node.js
fix bug on Node.js