fix race condition with puts
Merge pull request #87 from csquared/fix-logging-race

fix race condition with puts