Fix memory leak and console epipe error in nodeiron-control run