record interactive terminal sessions