Refactoring debugger to not generate a log file it not on debugging mode