use temp file in testing