Fixed to remove a nil pointer dereference on error due to logging