var rd = readline.createInterface({
input: fs.createReadStream(file),
output: process.stdout,
terminal: false
});
rd.on('line', function(line) {
And is any way how to make "on" working synchronous. Code inside "on" loop need to be done before executing loop again. Is any way how to do that?