Changing tempfile so that it accepts one more argument that is the file path