error checking in checksave