More efficient log file opening.