Updated script for words found are printed out immediately