merged echo and exit