generate temp file path automatically