proper lock on writer, make sure controller action happens in a goroutine