function to check and load an specific set of libraries
loadLibrary(lib)
lib
is a list of packages to be loaded