Robustify client file selection algorithm