test layout and data file writing