Factor out App_Data writing