Formatted the output file to match mif format