Adding a few more ensure blocks for resource deletion