Volumio freezing problem and its solution

Hi, I use os volumio on mac mini, and intel nuc. I listen to music in the background 24/7. And I encountered such a problem that playback periodically freezes on both devices, you can’t enter the android application at all, the interface works from the computer, but there is no sound, the tracks switch, the countdown goes. Only a reboot helps. I’m not very smart, so I didn’t find the location of the logs, the gpt chat helped in the log output command, unfortunately I didn’t save it, but there was an output of playback of only one song and a message that there was a problem with metadata. With the help of the same chat I received a working command to search and move problematic files, which solved my problem with playback, and after that everything works fine. Maybe my experience will be useful to others. Here are two commands, one searches for broken files, the other removes pauses at the beginning and at the end. Maybe someone will make a plugin based on them, which will be very useful in my opinion

mkdir -p /mnt/INTERNAL/fail
find /mnt/INTERNAL/ -type f -name '*.flac' -exec sh -c '
  echo "Checking file: $1"
  if ! flac -t "$1" 2>/dev/null; then
    echo "File $1 is corrupted. Moving to /mnt/INTERNAL/fail/"
    mv "$1" /mnt/INTERNAL/fail/
  fi
' _ {} \;
find /mnt/INTERNAL/ -type f -name '*.flac' -print0 | while IFS= read -r -d '' file; do
  printf 'Обработка: %s\n' "$file"
  sox "$file" "${file%.flac}_trimmed.flac" silence 1 0.1 1% reverse silence 1 0.1 1% reverse &&
  mv "${file%.flac}_trimmed.flac" "$file"
done