Added newline to log file writing

Added argument to write newline