Move warning message from its own method.