add proper error when loading R-packages failes