Fix previous commit, which adds warn instead of `console.log`.
Now warn uses console.warn if it is available, console.log if it is not,
and does nothing otherwise.

Note that perfDiagnostics.ts was removed in the previous commit.