Move workerThreadMain to separate file.