adding extension option
adding extension option for directory recursive walk