Append text to a piped file
In my opinion, this solution is more concise:
echo "text to append" | cat filename.txt - | final_command
It is also more flexible, for instance, you can
echo "text to append" | cat file1.txt - file2.txt ... | final_command
The solution which OP chose would be awkward in the second case.