moving code int Worker; worker logging