make sure reference is valid for the whole function duration
buildh: don't use -t rsync flag