Only create temporary file when parse succeeded.