fix race condition in logger