better error handling when installing R packages