added a method for writing fragments to mgf files.