only show error message if we're in debug mode