Oh, Yes, Rui. I just read Duncann's answer and it is definitely the way to go. Not nearly as fancy as an answer, but the best advice ever. Why patch some bad code with additional code, when we can just make it cleaner from the start? It is a bit hard to get a working answer like that though, for SO, as the OP may have to share the entire script, and we do not want to change SO into a code review forum. Thanks for the references. —
GuedesBF 59 secs ago