Refactor: append newline at end of file