Optimize log file read