Debugging mode functionality

can turn debugging on or off (turn Logs on and off)