Replace option basedir by dir