New functions for dealing with log files.