One another note: You use a constant here, this will print warning if you run the client twice or more times. `unless defined XYZ` might be needed.