Added warning method

Added warning method.