Jupyterlab problem related to tensorflow

I purchased a new Windows PC with Nvidia graphic card. Then I downloaded miniconda and used conda to install tensorflow-gpu V2.5 and various packages. It works fine except when I shut down the kernel, I received the following error messages:

[I 2021-11-04 21:34:24.405 ServerApp] Kernel shutdown: c7b2b2fd-f799-47cd-babb-8775ee1c1be4
Error in atexit.run_exitfuncs:
Traceback (most recent call last):
File “C:\Users\dlin1\miniconda3\lib\logging_init
.py”, line 2127, in shutdown
File “C:\Users\dlin1\miniconda3\lib\site-packages\absl\logging_init _.py”, line 951, in close
File “C:\Users\dlin1\miniconda3\lib\site-packages\ipykernel\iostream.py”, line 428, in close
if self._exc:
AttributeError: ‘OutStream’ object has no attribute ‘_exc’

After some debugging, it narrowed down to tensorflow. I have a barebone notebook with just one line:

import tensorflow as tf

After I execute the code and shutdown the kernel, the above error message appears. I have posted question on Jupyter forum. But they suggested that I should narrow down to the offending package and ask for help there.

Can someone please suggest what packages relating to tensorflow I should check? Thanks in advance.