added export directory support