Use logger.error as logger.err doesn't exist

This fixes how to correct log errors as per other examples in the same file.