Replace subprocess events for directly stdout and stderr.
fixed merge conflict - and restored lastStarted