Make error handling more robust
Merge branch 'content' of github.com:vingtetun/gaia into HEAD