file: defer checking the tmpfile until it is actually needed.