CpuSet write_to_cgroup: catch errors from close()