more debug code for RPC layer