Show error on console only if debug mode is activated - template