fixed #22: Missing call to device.upload(). Was calling device.download() instead.