Logstash can't recognize csv columns

autodetect_column_names uses the very first event that logstash sees to determine the column names and never changes them. You could count columns or else do a conditional based on the filename.