Updated distribution from 610797f
added error checking to publish script