The `newfile=$(basename $i .fq.gz)` notation is slightly preferred here.