Improved upload

- [x] upload
- [x] handle errors

#36 #37