FileUtils.copyFile(this.getCatalogFile(catalog.getId()), this.getCatalogFileBkup(catalog.getId()), true);
FileUtils.copyFile(this.getCatalogFileWorker(catalog.getId()), this.getCatalogFile(catalog.getId()), true);
this.getCatalogFileWorker(catalog.getId()).delete();
this.getCatalogFileBkup(catalog.getId()).delete();
}catch (Exception e) {
throw new CatalogRepositoryException("Failed to Serialized Catalogs to '" + this.storageDir + "' : " + e.getMessage(), e);
}finally {
try {
catalogOut.close();
}catch (Exception e) {}
}