Added printing exception when persisting objects