Add fail safe so we don't lose all previous data in case something goes wrong