fixed logger shutdown problem