add ‘recursive’ option to prevent search descending into subdirectories