added handling of JSONRPCException
enabled switchin of bitcoind/namecoind mode from config