Correct number of grids in file is saved