Added error checking on persist module