added ttyrec files, to implement recording and playing back