//updating package header
if (lastModified != null && pkg.getLastModified().after(lastModified)) {
throw new RulesRepositoryException("The package was modified by: " + pkg.getLastContributor() + ", unable to write changes.");
}
pkg.updateStringProperty(readContent(in), ModuleItem.HEADER_PROPERTY_NAME);
pkg.checkin(comment);
rulesRepository.save();
} else {
AssetItem as = pkg.loadAsset(a[0]);
if (lastModified != null && as.getLastModified().after(lastModified)) {
throw new RulesRepositoryException("The asset was modified by: " + as.getLastContributor() + ", unable to write changes.");