fixing Proc stdin/out/err problems