fix #1, support dir recursive