Better cleanup of insert session when errors occur.
Better cleanup of persistence resources (IDisposable is not necessary).