Probably
while read FILE1
is to blame. See Understanding IFS= read -r line
. Then ""$FILE1""
is an empty string, unquoted $FILE1
and another empty string – totally equivalent to unquoted $FILE1
, thus wrong.