add #to_s
use IO#select to improve process handling