catch null pointer when socket outputstream fails to initialize, throw IOException and reconnect