Added more logging into custom sessions.