adding log search and self hostname lookup
adding autoreconnect code