Only show error messages when debug is enabled