add read dir support