Well, I'm wrong, I cannot delete appendLog function, each promise result is store one at the time, so I'm sending to print into console and to write it into the fille as well.
What do you recommend? save all promises values/reasons into a temporal value and then writeFileSync(path, alldata, utf-8); ??
I can do it without any problem.