Log error before trying to handle it

Signed-off-by: Michal Čihař <michal@cihar.com>
Wrap long line

Signed-off-by: Michal Čihař <michal@cihar.com>