reworked the output

instead of having two appends to the same file I put them into the same command. I believe I can clean it up further.