Fix deprecated logger warning for Python 3

logger.warn() has been deprecated in Python 3 in favor of logger.warning()