it is because when you use a pipe bash start a subshell to execute the while read ...
and so you are not under the scope of your ZIP and FILE variables when you try to echo them and then you get null.
To avoid this you can use a 'for' instead :
for LINE in "$(cat $FILENAME)"
count=`expr "$count" + 1`
case $count in