Exploit the worker thread to write into the log file