there is another problem, when more than 1 "error" string is found within a file, the script only capable to return the first found of string and onwards are duplicated, then how to fix it?