Added optional callback to handle errors
Merge pull request #42 from MatAtBread/master

Added optional callback to handle errors