@UserTrue Thank you for your advice. Yes, at first I tried the built in mongodb with it's module. It made me quite fast switch over to MySQL and the appropriate node.js module ;)
@bobbyonforum You can also use different file names like 1.txt 2.txt which contains text and then read file with thread number, example : [[THREAD_INDEX]].txt if this way fits your requirements.