[V5] add newline at end of files

rebased #500.