Handle core errors using exit()