methods/mirror.cc: improve debug output and fix selecting the next mirror