Script now handles year ranges in different files