diff --git a/includes/LDAPInterface.inc b/includes/LDAPInterface.inc
index 3884415..cbf7d99 100644
--- a/includes/LDAPInterface.inc
+++ b/includes/LDAPInterface.inc
@@ -290,7 +290,16 @@ class LDAPInterface {
         }
       }
     }
-    return ldap_modify($this->connection, $dn, $attributes);
+    $success = ldap_modify($this->connection, $dn, $attributes);
+
+    if (!$success) {
+      watchdog('LDAPInterface', 'Could not write attributes. (Error %errno: %error).', array('%errno' => ldap_errno($this->connection), '%error' => ldap_error($this->connection)), WATCHDOG_ERROR);
+      if (variable_get('ldapauth_debug', FALSE)) {
+        watchdog('LDAPInterface', 'DN: %dn Attributes: %attrs', array('%dn' => $dn, '%attrs' => var_export($attributes, TRUE)), WATCHDOG_DEBUG);
+      }
+    }
+
+    return $success;
   }
 
   function create_entry($dn, $attributes) {
