added error for persisting data