Exit program on connection closed

Rewrite to reconnect feature later