added export-dir option