Trim trailing spaces + Add insert final newline