Fixed reading from log with newline