tailxyz.sh: handling empty files and wrong formats