added some error handling to deploy app