Write model to temp file, will write to data source file later.