Function for operations requiring die()