The output is correct, it writes content to the file, every String is on a new line, why doesn't the program validate.