add temp file path utility function