checking existence of resources before deploying