check return code when processing ldif