improve wait_serial let it can works correctly if expected can not found...

... the term