replaced duplicated paths by ${checkfiles[0]}