Replace ExitOnWin32Error with ExitWithLastError.