Use exceptions for error handling
Add docstring
Avoid running package_show for all datasets unnecessarily