_doSaveAs error handling and a workaround for #4418