Enhanced error handling (pkg non-existent).