Many files valid for previewer, such as archives, are treated as binary and thus were not passed to the previewer. Also sanitizes the previewer output, to some extent.
This way, the script can do a little magic like head -n $2 $1 | highlight -O ansi --syntax ${1##*.} to avoid reading whole (possibly huge) file.