Low level logging and handling of memory errors in impact_calculator. See #476
Better unit test handling for #476