Document error handling, fixes #67