cleaned up file download stuff