add support of datadir/htmldir configuration