Implement log file generation