Quick fix to ANR when recursively scanning directories