Change toTempFile to keep the whole name