add some debug prints in the session code