Replace aborts with a die function