Separate master and worker thread files