added deploy script
added error-checking to deploy script