adding exit on fail