writeMgfData with progress bar