moving to tempfile for platform and hard coded path independence