writes reference schema to local data file