Move connection log into else