small refactoring for local files copying