Fix bug in the blocking version of CLOSEDLOOP command handler
Switch to blocking CLOSEDLOOP handler while getting rid of nested callback version