Use die utility function instead of exit