Fixed threadpool join thread bug. Started implementing file swap.