I have added exit statement with error code