several updates wrt to tpi script and Isabelle session