Small changes to Write/Read Mifile