moved numTasks to main, cerr it on start