Fixed accessing library via HTTP
Improved error handling of HTTP access