create a temp file based local preview