The script will fail on any error. So you can exactly know the point at which it fails.
JPMontero_Intel if you have the time please test the script out. It can be useful to everyone I think. Especially to people who are new to this. Its not commented since I wrote it thinking it would be for my own use. But if it is helpful maybe I can clean up a bit.