debug: Debug mode now make logs be directly displayed in console
Use class method equivalent instead of standalone functions