Ensure adding new line at the last to formatted results

It suppress a "No newline at end of file" warning from diff.