error wrap uses logger also