thread close added to method getText()