Updated the how to publish document. Fixed a minor bug in script, while saving attached images