tried to implement io redirection for stdout and stderr after forking. it doesn't seem to work.