Factor out the transcription reader/writer logic.