log the error proper-like