Leveldb optimisation for folds.
ADded catch for fold.
Fixed throw.
Fixed throw.