Add error checking to printRoundTerminationMesasge and new line to the end of the files