better check for basedir