better error logging in sendResultAndGetNext