added sanity checks to shutdown erase