Fix check_for_file_and_add
's check for conflict file
#12135
Merged
check_for_file_and_add
's check for conflict file
#12135