CORE-5068: added some additional logging and error handling