Change fprintf by mfprintf in some files
Change write by mfprintf in export functions