added logging line for die function