Practice 9: save rates to file