reduce log file size

By default, log file can be a few GB.
Reduce the log frequency and implement log rotation.