Add better error handling to package installation.