improvements for ldaps operation and debug