log: log files are buffered by default
util: fixed a compilation warning / potential numeric overflow