Added logDebug and backtracking

Signed-off-by: Titouan Rigoudy <titouan.rigoudy@gmail.com>