restore persistence; make some error messages better