graceful shutdown implemented, still have problem with worker thread object