reduce chunk size when downloading, raise exceptions on problems and close connection when done