[V4] add newline at end of files

rebased #341.