fixed race condition in log worker

close #130