Don't download new file if what we have is already current
Improve error handling on file writes, use locks