write files mg_minimum_rate, mg_flag_0, mg_flag_1