Merge pull request #40 from aybabtme/assert-type-avoid-panics

Checks that the `error` field is really of `error` type.
Export package func to a standard logger.