Fixed an important bug that prevented provisioning to work, added handling of errors in another place in shell