Better file download handling