Wrapped Warn Format With IsWarnEnabled

Wrapped Warn Format With IsWarnEnabled, so to not format the string
unless it's enabled.