Using logging to log warning