clear output and resave