better error management for downloadingand some small enhancements