trim the new lines from the end of the command output on errors, just in case...
be sure to close the input file when done.
don't use a `defer` to push things onto the channel, also catch errors where the end marker is never detected...
move error handling into channel communication, not to interrupt the directory walk.