exit if something is wrong with the parameters