Modified data formatting for file write