added sample for download and upload, added debug