fixed console.logs to work only on debug