Automatically flush to disk when downloading files