add download file functionality