add handling of stdio descriptors