Fix script to generate .mmf file