imporved logging for session debug