clientlib.buildFiles() refactoring