Fixed errors and added logging for ldaptive.