use std::terminate instead of abort