Fix runner onDone triggering when output is a file