Add output to file, checking workspace cleaning