Adding debug mode.