close file handles
also match hosts that listen on a custom port
fix: check for close attr on stdout/stderr