improve error handling for elastic search updates
fix syntax errors
Merge pull request #30 from coryb/master

improve error handling for elasticsearch