anchor.diff:      case exec_ldapsearch(Mode, Handle, Args) of
   	error ->
   	    logger:log(error, "LDAP client: Error returned from exec_ldapsearch (~p), " ++
  -		       "closing LDAP handle ~p and retrying query", [Mode, Handle]),
  +		       "closing LDAP handle '~p', opening new handle and retrying query", [Mode, Handle]),
   	    ldap_close(Handle),
   	    case catch ldap_connect(Server) of
  -		{'EXIT', E} ->
  -		    logger:log(error, "LDAP client: Could not connect to LDAP server ~p : ~p", [Server, E]),
  -		    %% This is bad. We have closed our old handle and could not get a new one...
  -		    {error, error};
   		NewHandle when record(NewHandle, ldaphandle) ->
   		    logger:log(debug, "LDAP client: Retrying query using new LDAP handle ~p", [NewHandle]),
   		    %% New handle returned, retry query and return new handle plus result of retry
   		    Res = exec_ldapsearch(Mode, NewHandle, Args),
  -		    {NewHandle, Res}
  +		    {NewHandle, Res};
  +		Unknown ->
  +		    logger:log(error, "LDAP client: Could not connect to LDAP server ~p, ldap_connect() returned ~p",
  +			       [Server, Unknown]),
  +		    %% This is bad. We have closed our old handle and could not get a new one...
  +		    {error, error}
   	    end;
   	Res ->
   	    {Handle, Res}
  
positive.code: 	    logger:log(error, "LDAP client: Unknown result from ldapsearch_unsafe (handle ~p, query ~p ~p) :~n~p",
  		       [Handle, Type, In, Unknown]),
  	    error
      end.
  
  get_valuelist([], Attribute) ->
      [];
  
negative.code: 		H when record(H, ldaphandle) ->
  		    logger:log(debug, "LDAP client: Opened new connection to server ~s", [Server]),
  		    {noreply, State#state{handle=H, querycount=0}, ?TIMEOUT};
  		E ->
  		    logger:log(error, "LDAP client: Could not reconnect to LDAP server ~p : ~p", [Server, E]),
  		    %% Keep using old handle in hope that it is still working.
  		    {noreply, State, ?TIMEOUT}
  	    end;
  