improvement to detect which files to compute