Avoid resaving consensus loaded from cache
Save cached network information first to a temporary file to avoid races which corrupt cache files