for (Property property : props) {
try{
String oldVal = property.getTextValue();
String newVal = migrateStringSavely(oldVal);
property.setTextValue(newVal);
pm.updateProperty(property);
counter++;
DBFactory.getInstance().intermediateCommit();
} catch (Exception e) {
log.error("Error during Migration: "+e, e);
DBFactory.getInstance().rollback();