Add temporary file function