record and play back terminal session