Improved error handling in Storages class