Improved an error message
Hopefully more robust