Check if last character in file is '\n' when adding statistic string (some editors don't write a '\n' after the last line)