Edited while loop into WorkerThreadClient