fix data race in SimpleLogger by making state indicator variable atomic