Added die() at the end of the function