support --log-dir option