Add error reporting

Signed-off-by: Aleksey Snisar <osni@isd.dp.ua>