debuging around pty