Added protections for data dirs on re-install