Added try and catch to ChatClientServer