made scaffold check for basedir first