Remove script collections before trying to add a new collection. If latter fails no invalid collections are removed