public void SaveAs(object argument) { try { if (_epfArchive == null) { throw new InvalidOperationException("EPF Archive not opened!"); } //if (IsArchiveSaveAllowed == false) // throw new InvalidOperationException("EPF Archive save not allowed!"); var archiveFilePath = argument as string; _epfArchive.SaveProgress += _epfArchive_SaveProgress; _epfArchive.SaveAs(File.Create(archiveFilePath)); ArchiveFilePath = archiveFilePath; AppLabel = $"{APP_NAME} - {ArchiveFilePath}"; } catch (Exception ex) { Status.Log.Error($"Unable to save entries. Reason: {ex.Message}"); } finally { _epfArchive.SaveProgress -= _epfArchive_SaveProgress; } }