Sonar:  Method may fail to clean up stream or resource on checked exception.
Improved the logging.