how to avoid currupted file download