ab34023c51
ls glob on empty cache dir exits non-zero and kills script under set -euo pipefail. Switched to find which exits 0 on no matches. Same fix for grep|sed pipeline in device selection; added empty DEVICE guard.