added sleep before sensing slave pty