Error logging added.

Signed-off-by: James Boggs <jmsboggs@gmail.com>