Adding debug mode