Better logging for return in rpc handler