read mgf file