added check for GEM_HOME