Fix outfile errors