Adding debug mode feature