Change requestToNode() to json-rpc. Add old rpc (cli). Check all return value before parsing (json or not).