Added retry attempts to syncFiles.