Update file parsing and fix counter so it shows the right number of expansions.