exit incase of failure