My bad i have updated the code it was a mistake, but your solution works good :)
In reply to Re^2: Function for reading file by shabird in thread Function for reading file by shabird