This code seems to think it'll magically read one extension at a time from the file.