DOC: refactor warning messages