write the output of convert into a temp file