Adding debug mode and lp