Index: src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
===================================================================
--- src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision 945797f95219fcd318b1f18698111a476cbd3985)
+++ src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision ce70d2554543ca50640e1dc55a95440d06f517e2)
@@ -288,5 +288,5 @@
 #endif
 
-void appendToHomologies(
+bool appendToHomologies(
     const FragmentationShortRangeResults &shortrangeresults,
 #if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
@@ -317,4 +317,12 @@
     LOG(2, "DEBUG: Created graph " << graph << ".");
     const IndexSet::ptr &index = *iter;
+    if (!(**forceiter).contains(**iter)) {
+      // this caught an error with faulty KeySetsContainer::insert().
+      // indexset and forceindexset need to be in same order and differ
+      // only in forceindexset contains extra indices for saturation hydrogens
+      ELOG(1, "appendToHomologies() - force index set " << (**forceiter)
+          << " does not contain index set " << (**iter) << ".");
+      return false;
+    }
 
     /// we fill the value structure
@@ -324,7 +332,9 @@
     std::map<IndexSet::ptr, std::pair< MPQCDataFragmentMap_t, MPQCDataFragmentMap_t> >::const_iterator fragmentiter
         = shortrangeresults.Result_perIndexSet_Fragment.find(index);
-    ASSERT( fragmentiter != shortrangeresults.Result_perIndexSet_Fragment.end(),
-        "appendToHomologyFile() - cannot find index "+toString(*index)
-        +" in FragmentResults.");
+    if (fragmentiter == shortrangeresults.Result_perIndexSet_Fragment.end()) {
+      ELOG(1, "appendToHomologyFile() - cannot find index " << (*index)
+          << " in FragmentResults.");
+      return false;
+    }
     value.fragment = boost::fusion::at_key<MPQCDataFused::fragment>(fragmentiter->second.first);
 
@@ -332,7 +342,9 @@
     std::map<IndexSet::ptr, std::pair< MPQCDataEnergyMap_t, MPQCDataEnergyMap_t> >::const_iterator energyiter
         = shortrangeresults.Result_perIndexSet_Energy.find(index);
-    ASSERT( energyiter != shortrangeresults.Result_perIndexSet_Energy.end(),
-        "appendToHomologyFile() - cannot find index "+toString(*index)
-        +" in FragmentResults.");
+    if (energyiter == shortrangeresults.Result_perIndexSet_Energy.end()) {
+      ELOG(1, "appendToHomologyFile() - cannot find index " << (*index)
+          << " in FragmentResults.");
+      return false;
+    }
     value.energy = boost::fusion::at_key<MPQCDataFused::energy_total>(energyiter->second.second); // contributions
 
@@ -343,7 +355,9 @@
       std::map<IndexSet::ptr, std::pair< MPQCDataGridMap_t, MPQCDataGridMap_t> >::const_iterator chargeiter
           = longrangeresults.Result_perIndexSet_Grid.find(index);
-      ASSERT( chargeiter != longrangeresults.Result_perIndexSet_Grid.end(),
-          "appendToHomologyFile() - cannot find index "+toString(*index)
-          +" in FragmentResults.");
+      if (chargeiter == longrangeresults.Result_perIndexSet_Grid.end()) {
+        ELOG(1, "appendToHomologyFile() - cannot find index " << (*index)
+            << " in FragmentResults.");
+        return false;
+      }
       value.charge_distribution = boost::fusion::at_key<MPQCDataFused::sampled_grid>(chargeiter->second.second); // contributions
 
@@ -351,7 +365,9 @@
       std::map<IndexSet::ptr, std::pair< VMGDataGridMap_t, VMGDataGridMap_t> >::const_iterator potentialiter
           = longrangeresults.Result_perIndexSet_LongRange_Grid.find(index);
-      ASSERT( potentialiter != longrangeresults.Result_perIndexSet_LongRange_Grid.end(),
-          "appendToHomologyFile() - cannot find index "+toString(*index)
-          +" in FragmentResults.");
+      if (potentialiter == longrangeresults.Result_perIndexSet_LongRange_Grid.end()) {
+        ELOG(1, "appendToHomologyFile() - cannot find index " << (*index)
+            << " in FragmentResults.");
+        return false;
+      }
       // add e+n potentials
       value.potential_distribution =
@@ -369,5 +385,5 @@
 //        *iter -= offset;
 #else
-      ELOG(1, "Long-range information in homology desired but long-range analysis capability not compiled in.");
+      ELOG(2, "Long-range information in homology desired but long-range analysis capability not compiled in.");
 #endif
     }
@@ -404,4 +420,6 @@
     }
   }
+
+  return true;
 }
 
@@ -561,4 +579,5 @@
 
 ActionState::ptr FragmentationAnalyseFragmentationResultsAction::performCall() {
+  bool status=true;
 
   /// if file is given, parse from file into ResultsContainer
@@ -575,4 +594,6 @@
     } else {
       ELOG(1, "Given file" << resultsfile.string() << " does not exist.");
+      STATUS("AnalyseFragmentResultsAction failed: missing results file.");
+      return Action::failure;
     }
   }
@@ -715,5 +736,5 @@
 
     // append all keysets to homology file
-    appendToHomologies(shortrangeresults, longrangeresults, params.DoStoreGrids.get());
+    status = appendToHomologies(shortrangeresults, longrangeresults, params.DoStoreGrids.get());
   } else {
     // append all keysets to homology file with short-range info only (without grids)
@@ -721,5 +742,5 @@
     FragmentationLongRangeResults longrangeresults(
         shortrangedata, longrangeData, keysets, forcekeysets);
-    appendToHomologies(shortrangeresults, longrangeresults, false);
+    status = appendToHomologies(shortrangeresults, longrangeresults, false);
   }
 #else
@@ -729,5 +750,5 @@
 
   // append all keysets to homology file with short-range info only (without grids)
-  appendToHomologies(shortrangeresults, false);
+  status = appendToHomologies(shortrangeresults, false);
 #endif
 
@@ -735,5 +756,10 @@
 //  container.clear();
 
-  return Action::success;
+  if (status)
+    return Action::success;
+  else {
+    STATUS("AnalyseFragmentResultsAction failed: invalid results, failed to append to homologies.");
+    return Action::failure;
+  }
 }
 
Index: src/Fragmentation/Exporters/SaturatedFragment.cpp
===================================================================
--- src/Fragmentation/Exporters/SaturatedFragment.cpp	(revision 945797f95219fcd318b1f18698111a476cbd3985)
+++ src/Fragmentation/Exporters/SaturatedFragment.cpp	(revision ce70d2554543ca50640e1dc55a95440d06f517e2)
@@ -243,4 +243,7 @@
         atomiter != CutBonds.end(); ++atomiter) {
       atom * const Walker = atomiter->first;
+      ASSERT( set.find(Walker->getId()) != set.end(),
+          "SaturatedFragment::saturate() - key "
+          +toString(*Walker)+"not in set?");
       LOG(4, "DEBUG: We are now saturating dangling bonds of " << *Walker);
 
