Use sync.Once instead of bool flag