Added debug option to console.log

Added debug option on app.js and log function on Tools.js
now we can use Tools.log() instead of console.log() to debug messages, and if we put app.debug = false, it wouldnt show logs anymore