write to in-memory data file