Add error checking and INVALIDCMD response from server.