Changed warn to @log.warn in get_ip