maybe fixed download to use temp files