Use warn instead of raise