Create threadManager.js