Added debug option to cli

tested and working.