$basedir can be changed now