add persisted headers to record and writers

address #13