Generate log file