added error handling for deploy command