Save error messages

Far from being comprehensive, but at least it will throw a useful error
message on adding an item incorrectly.