correctly use BASEDIR