Added better error handling around package installation