Improve error messages when loading a dataset