added newline to file write