improve detection of changed files for rebuild trigger