fix log thread error