set system in/out redirection
file in/out channel, channel means ownership
add buffer casting