added opt-dir config option
eliminated warnings