Since this script takes a while to run, I added a bunch of echoes so you can see where it is in the process.