After all srun tasks have terminated on a node close the stdout/stderr
channel with the slurmstepd on that node.
Remove trailing space.
In case of i/o error with slurmstepd log an error message and abort the
job.