Added some basic error checking as promised to the script hopefully making it a little more robust.
Updated the document with latest information