Refactor to a class

Move setting of R_LIBS_USER to the config file, path set to user
environment
Check for success script execution.