make spawn discard_output arg optional