Added error checking for packaging script