wrapped file download in try-catch