Change warnings.warn back to logger.warn

so that tests don't fail.