Improve changed file detection