typo, also, flattening ioformat output
handling tcp errors properly