Fixed format for output.txt file

final_output1,2 & 3 were arrays. Needed to join by newline.