il proble è che max_righe è più grande delle effettive righe del file