Restructure get_worker

Also add some log messages