use log.warning() instead of log.warn()