Pass stdout and stderr to spawned commands
Correct type assertions