Refactor so creating the temp file is abstracted into baseclass