splitting setVariables and temp file handling