utils.log: Restrict I/O error handling coverage