Exit program if invalid parameters are passed in