fixed bug where tee was looking at empty output
fixed bug where tee was looking at empty output

output[-1] call was failing when list was 0
added check for len(output) before checking
for item -1

amplify-education/rover,mdg/rover