get basedir from environment