bug fixes
more error checking
Merge pull request #305 from langtech/cloud-storage-library-bug-fix

Cloud storage library bug fix