fix race condition
Merge pull request #2 from remind101/sync-create-logs

fix race condition