solved problem pexpect wait