Write file only for persisted record