added timeout to zGetText() function