Use die function instead of echo+exit