Fix sessionId reference in error logging