Add debugging to section deletion code