Set I/O in execute_command. Do not create child process to call execute_switch.