add newline at end of files

rebased #262.