spec: close log files

[ci skip]