Adds some error reporting to LDAP