adding more debug statements to RPC logic