Fixed 0s in txt file

Fixed the fact that txt file showed only 0s by adding a delay before
update()