Improving example by adding an error message.