change fileRecordWriter to take a list