changed die to exit