exiting if hanlder fails