Write iterator for log