More robust data saving