minor improvement for detecting files to be skipped