you should check for `newpath` first, and use that if present; if not, fall back to using the deprecated `oldpath`, and log with the warning