in reply to Exiting a program
Quoting die:
If the last element of LIST does not end in a newline, the current script line number and input line number (if any) are also printed, and a newline is supplied.
But you probably want to use exit here.